Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Inheritance Control and Copying

Custom attributes may be inherited or not, as determined by the metahandler. If inheritance is supported, then the metahandler should return kQ3True from the kQ3XMethodTypeAttributeInherit method and kQ3False otherwise.

If inheritance is supported, the inheritance function called internally just copies the data representing the attribute, using the size parameter specified in the registration call. If more complex behavior is desired, however, the custom attribute must be supplied with a TQ3XAttributeCopyInheritMethod method to be called at inheritance time. This might be the case, for example, if there were a variable-size array in the data structure.

TQ3XAttributeInheritMethod

The TQ3XAttributeInheritMethod functionality reports whether an application-defined attribute supports inheritance.

#define kQ3XMethodTypeAttributeInherit Q3_METHOD_TYPE('i','n','h','t')
typedef TQ3Boolean TQ3XAttributeInheritMethod;
return value
kQ3True or kQ3False .

DESCRIPTION

The TQ3XAttributeInheritMethod method returns kQ3True if inheritance is supported and kQ3False otherwise.

TQ3XAttributeCopyInheritMethod

The TQ3XAttributeCopyInheritMethod functionality performs inheritance of an attribute in an application-defined object.

#define kQ3XMethodTypeAttributeCopyInherit Q3_METHOD_TYPE('a','c','p','i')
typedef TQ3Status (*TQ3XAttributeCopyInheritMethod)(
                     const void    *fromInternalAttribute,
                     void          *toInternalAttribute);
fromInternalAttribute
Internal attribute to be copied from.
toInternalAttribute
Internal attribute to be copied to.

DESCRIPTION

The TQ3XAttributeCopyInheritMethod method provides inheritance from the attribute designated by fromInternalAttribute to the attribute designated by toInternalAttribute.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |